package com.test.dao;

import com.test.entity.StuAllInfoDto;

public class EchartInfoProvider {


    public String selectAllCompCount(){
        StringBuilder sql = new StringBuilder();
        sql.append("select COUNT(comp_name) as compCount from table_compbase_info");
        return sql.toString();
    }


    public String selectPieChart(){
        StringBuilder sql = new StringBuilder();
        sql.append("select COUNT(stu_compjobstatus) as value ,case when stu_compjobstatus='0' then '未填写状态' else  stu_compjobstatus end as name from table_stujob_info GROUP BY stu_compjobstatus;");
        return sql.toString();
    }



    public String selectCompMap(){
        StringBuilder sql = new StringBuilder();
        sql.append("select comp_province,comp_city,comp_county,comp_address from table_compbase_info;");
        return sql.toString();
    }


    public String selectkindCount(){
        StringBuilder sql = new StringBuilder();
        sql.append("select stu_compkind,COUNT(u_acount) as num from  table_stujob_info where stu_compkind !='0' GROUP BY stu_compkind;");
        return sql.toString();
    }

    public String selectBarCompNum(){
        StringBuilder sql = new StringBuilder();
        sql.append("select comp_kind as name,COUNT(comp_kind) as num from table_compbase_info GROUP BY comp_kind");
        return sql.toString();
    }


    public String selectStuAttentKindPieChart(String u_acount){
        StringBuilder sql = new StringBuilder();
        sql.append("select wangshenjob as name,COUNT(wangshenjob) as value from table_compattentstu_info where 1=1 ");

        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append(" and u_acount='"+u_acount+"'");
        }else{
            sql.append(" and u_acount='"+0+"'");
        }

        sql.append("GROUP BY wangshenjob");
        return sql.toString();
    }

}


